/*
 * Copyright (c) 2015, Potevio Information Technology Co., Ltd. 
 * All rights reserved.
 * POTEVIO PROPRIETARY/CONFIDENTIAL.
 */
package com.cpit.platform.common.entity;
/**
 * ztree节点数据封装。该结构为ztree加载树节点内容时返回给前台时使用。
 * 根据实际的需求，可以再该类中补充成员变量，或者继承该类。
 * 
 * @author zhanghaibin
 * @date 2016-01-20
 */
import java.util.ArrayList;
import java.util.List;

public class ZTreeNode {
	public static final String NODE_TYPE_GROUP = "group";
	public static final String NODE_TYPE_ORGANIZATION = "organization";
	public static final String NODE_TYPE_USER = "user";
	public static final String NODE_TYPE_AUTH = "auth";
	
	private String id = "";
	private String pId = "";
	private String name = "";
	private Boolean isParent = false;
	private Boolean open = true;
	private String nodeType = "";
	private String organizationCode;
	private ZtreeFontObject font = new ZtreeFontObject();
	
	/** 树节点悬浮框 */
	private String t = "";
	
	/** 前台使用的树节点图标信息。需要定义对应的css  */
	private String iconSkin = "";
	
	/** 子节点信息  */
	private List<ZTreeNode> children = new ArrayList<ZTreeNode>();
	
	public ZTreeNode() {
		super();
	}

	public ZTreeNode(String id, String pId, String name, Boolean isParent, String nodeType) {
		super();
		this.id = id;
		this.pId = pId;
		this.name = name;
		this.isParent = isParent;
		this.nodeType = nodeType;
	}

	@Override
	public String toString() {
		return "ZTreeNode [id=" + id + ", pId=" + pId + ", name=" + name + ", isParent=" + isParent + ", open=" + open
				+ ", nodeType=" + nodeType + ", t=" + t + ", iconSkin=" + iconSkin + ", children=" + children + "]";
	}

	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public String getpId() {
		return pId;
	}

	public void setpId(String pId) {
		this.pId = pId;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public Boolean getIsParent() {
		return isParent;
	}

	public void setIsParent(Boolean isParent) {
		this.isParent = isParent;
	}

	public String getNodeType() {
		return nodeType;
	}

	public void setNodeType(String nodeType) {
		this.nodeType = nodeType;
//		this.iconSkin = nodeType;
	}

	/** 暂时使用默认的样式  */
	public String getIconSkin() {
		return iconSkin;
	}

	public void setIconSkin(String iconSkin) {
		this.iconSkin = iconSkin;
	}

	public List<ZTreeNode> getChildren() {
		return children;
	}

	public void setChildren(List<ZTreeNode> children) {
		this.children = children;
	}

	public Boolean getOpen() {
		return open;
	}

	public void setOpen(Boolean open) {
		this.open = open;
	}

	public String getT() {
		return t;
	}

	public void setT(String t) {
		this.t = t;
	}
	
	public ZtreeFontObject getFont() {
		return font;
	}

	public void setFont(ZtreeFontObject font) {
		this.font = font;
	}

	public String getOrganizationCode() {
		return organizationCode;
	}

	public void setOrganizationCode(String organizationCode) {
		this.organizationCode = organizationCode;
	}

}

